<!--
 * @Author: your name
 * @Date: 2021-12-22 14:19:25
 * @LastEditTime: 2022-01-04 17:03:29
 * @LastEditors: your name
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \xy-web-xiaoxi\public\onlyoffice\createDocumentPDF.html
-->
<html>
<header>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <style>
    *{
      margin: 0px;
    }
  </style>
</header>

<body>
  <div class="form">
    <iframe width="100%" height="100%"></iframe>
  </div>
</body>

</html>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script type="text/javascript">
  var newurl= ''
    newurl=getUrlParam('urldata')
  $(function () {
    var url = newurl+ '/api/eim/document_coa/get_coa_by_pdf'
    var documentId = getUrlParam('documentId')
    if (documentId == null) {
      alert("未检测到文档标识")
      return
    }
    url = url + "?documentCoaId=" + documentId
    $("iframe").attr("src", url)
    // console.log(url)
  })


  /**
   * 获取地址栏信息
   * @param name 参数名称
   * @returns {string| 参数值}
   */
  function getUrlParam(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
    var r = window.location.search.substr(1).match(reg);  //匹配目标参数
    if (r != null) return unescape(r[2]); return null; //返回参数值
  }

</script>
